<template>
	<view class="wish">
		<view class="wish_title"></view>
		<view class="gap"></view>
		<carousel :list="dataList" url-key="url" />
		<u-toast ref="uToast" />
	</view>
</template>

<script>
import carousel from '@/components/vear-carousel/vear-carousel';
import config from '../../static/config.js';
export default {
	components: {
		carousel
	},
	data() {
		return {
			dataList: []
		};
	},
	methods: {
		getOneList() {
			this.$u.api.getOne().then(data => {
				this.dataList = data.dataList;
			})
			.catch(err => {
				console.log(err)
				this.$refs.uToast.show({
					title: err.errMsg,
					type: 'error'
				});
			})
		}
	},
	onLoad() {
		this.getOneList();
	}
};
</script>

<style lang="scss">
.wish {
	.wish_title {
		width: 100%;
		height: 100rpx;
		background-color: #01aef0;
		background-image: url(../../static/images/one_logo.png);
		background-repeat: no-repeat;
		background-position: center;
	}
	.gap {
		height: 10vh;
	}
}
</style>
